package frameListeners;

import java.awt.Window;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import controller.PlateformeMain;

public class FermerFenetre implements ActionListener{
	
	private Window j;
	private String s;

	public FermerFenetre(Window j, String s){
		this.j=j;
		this.s=s;
	}
	
	public FermerFenetre(Window j){
		this.j=j;
		this.s=null;
	}
	
	@Override
	public void actionPerformed(ActionEvent e) {
		this.j.dispose();
		if(this.s!=null)
			PlateformeMain.core.unloadPlugin(s);
	}
}
